import java.util.Scanner;
public class Max{
    public static void main(String[] args){
        try(Scanner sc = new Scanner(System.in)){

            int[] array = new int[5];
            for(int i = 0 ; i < array.length ; i++){
                System.out.println("请定义数组中第" + (i + 1) + "个数");
                int a = sc.nextInt();
                array[i] = a;
            }
            int max = max(array);
            System.out.println("该数组中最大的一个数为" + max);
        }
    }
    public static int max(int[] arr){
        int a = arr[0];
        int i = 1;
        while(i < arr.length){
            if(a < arr[i]){
                a = arr[i];
            }
            i++;
        }
        return a;
    }
}